package com.example.administrator.funchat.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

import com.example.administrator.funchat.R;


/**
 * Inter界面
 * Created by Administrator on 2016/6/21.
 */
public class InterActivity extends Activity {

    private ImageView inter_img;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_main);
        inter_img = (ImageView) findViewById(R.id.inter_img);
        inter_img.setOnTouchListener(touchListener);


    }

    /**
     * 用户触摸点击imageview 进入注册登录界面
     */
    private View.OnTouchListener touchListener = new View.OnTouchListener(

    ) {
        @Override
        public boolean onTouch(View view, MotionEvent motionEvent) {
            int action = motionEvent.getAction();
            switch (action) {
                case MotionEvent.ACTION_DOWN:
                    Intent intent = new Intent(InterActivity.this, RegisterLoginActivity.class);
                    startActivity(intent);
                    break;

            }
            finish();

            return false;
        }
    };
}
